﻿using System.Windows;
using GalaSoft.MvvmLight.Messaging;
using ManagerClient.Authentification.Logic;

namespace ManagerClient.Authentification.Views
{
    /// <summary>
    ///     Interaction logic for LoginWindow.xaml
    /// </summary>
    public partial class LoginWindow : Window
    {
        public LoginWindow()
        {
            InitializeComponent();
            Messenger.Default.Register<NotificationMessage>(this, (nm) =>
                {
                    if (nm.Notification == "CloseWindowsBoundToMe")
                    {
                        if (nm.Sender == this.DataContext)
                            this.Close();
                    }
                });
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            //	string login =	LoginBox.Text;
            var dataContext = (LoginWindowViewModel) this.DataContext;
            string password = PasswordBox.Password;
            //Check password 
        }
    }
}